package com.twu.biblioteca;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class AppSafeExit extends MenuList {
    private String menuName = "Exit App";
    private File logFile = new File("src/com/twu/biblioteca/current.txt");


    public boolean execute() throws IOException {
        System.out.println("\nThank You!\n");
        BufferedWriter fileWriter = new BufferedWriter(new FileWriter(logFile));
        fileWriter.write("");
        fileWriter.close();
        System.exit(0);
        return false; // dead code
    }

    public String getMenuName() {
        return menuName;
    }

}
